package com.deke.order.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.deke.entity.EduVideo;
import com.deke.entity.TbPlayHistory;
import com.deke.order.dao.TbPlayHistoryDao;
import com.deke.order.service.TbPlayHistoryService;
import com.deke.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author ：陈昂（731712841@qq.com）
 * @date ：Created in 2023/1/4 20:05
 * @description：
 * @modified By：
 * @version:
 */
@Service
public class TbPlayHistoryServiceImpl implements TbPlayHistoryService {
    @Autowired
    private TbPlayHistoryDao tbPlayHistoryDao;
    /**
     * 分页查询
     * @param currentPage 当前页码
     * @param pageCount 当前页数
     * @param sessionStorage  会员id
     * @return
     */
    @Override
    public Result<IPage<EduVideo>> queryTbPlayHistoryid(Integer currentPage, Integer pageCount, String sessionStorage) {
        IPage<EduVideo> page = new Page(currentPage,pageCount);
       IPage<EduVideo> iPage = tbPlayHistoryDao.queryTbPlayHistoryid(page,sessionStorage);
        return new Result(page);
    }

}
